﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Windows;
using System.Windows.Forms;
using DataContextLayer;

namespace BlueHarvestSnippetGenerator.Pages
{
    

    public class LoginHandler:Login
    {

        public bool LogUserIn()
        {


            if (Status == LoginStatus.Reset)
            {
                if (CheckPasswordLength())
                {
                    if (ResetPassword())
                    {
                        Messages = "Your Password has been changed";
                        Status = LoginStatus.Pass;
                        return false;
                    }
                }

                return false;

            }

            return LogMeIn();

        }


        public int GetUserId()
        {
            return _userId;
        }
    }
}
